package com.cxm.weilai.util;

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


/**
 * 读取属性文件
 * @author zjs562748437@163.com
 */
public class ReadProperties {
    public static Properties prop = new Properties();

    /**
     * 读取配置参数
     * @param path  配置文件路径
     */
    public  static void readPropertie(String path) {
        Log log = LogFactory.getLog(ReadProperties.class);
        try {
            // 加载dbconfig.properties配置文件
            prop.load(new InputStreamReader(ReadProperties.class.getResourceAsStream(path), "UTF-8"));
        } catch (IOException ioException) {
            log.error(ioException);
        }
    }
}
